package com.anis.project.medcare.editors.table.content.providers;

import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import com.anis.jpa.medical.model.MedicalReport;
import com.anis.jpa.medical.model.Patient;

public class ReportTableLabelProvider implements ITableLabelProvider {

	@Override
	public void addListener(ILabelProviderListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		String result = "";
		if (element instanceof MedicalReport)
			switch (columnIndex) {
			case 0:
				result = ((MedicalReport) element).getReportName();
				break;

			case 1:
				result = ((MedicalReport) element).getReportDescription();
				break;

			case 2:
				if (((MedicalReport) element).getReportType() != null)
					result = ((MedicalReport) element).getReportType();
				else
					result = "Unkonwn Type";
				break;

			default:
				break;
			}
		return result;
	}

}
